import Vue from 'vue'
import VueRouter from 'vue-router'
import IndexView from "@/views/IndexView";
// import App from "@/App";
import screen from "@/views/screen";
Vue.use(VueRouter)

const routes = [
  //  重定向
  {
    path:'/',
    redirect:"/screen"
  },
  {
    path:'/screen',
    component: screen
  },
  //  首页
  {
    path:'/indexView',
    name:'IndexView',
    component: IndexView
  },
  //  详情页
  {
    path:'/detail',
    name:'DetailView',
    component: ()=>import('../views/DetailView')
  },
//个人中心
   {
    path:'/mine',
    name:'MineView',
    component: ()=>import('../views/MineView')
  },
  //  修改个人信息
  {
    path:'/person',
    name:'MyPerson',
    component: ()=>import('../views/MyPerson')
  },
  //  点赞
  {
    path:'/likes',
    name:'MyLikes',
    component: ()=>import('../views/MyLikes')
  },
  //  关注
  {
    path:'/attend',
    name:'MyAttend',
    component: ()=>import('../views/MyAttend')
  },
    //收藏
    {
        path: '/collection',
        name: 'MyCollection',
        component: () => import('../views/MyCollection')
    },
    //登陆
    {
    path:'/login',
    name:'LoginView',
    component: ()=>import('../views/LoginView')
  },
  //  忘记密码
  {
    path:'/forget',
    name:'ForgetView',
    component: ()=>import('../views/ForgetView')
  },
  //  注册
  {
    path:'/register',
    name:'RegesterView',
    component: ()=>import('../views/RegesterView')
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
